import Vue from 'vue';
import store from './store';
import Cookies from 'js-cookie';
import ECharts from 'vue-echarts/components/ECharts.vue';
import 'normalize.css/normalize.css'; // A modern alternative to CSS resets

import App from './App.vue';

import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';

import '@/styles/index.scss'; // global css

// import locale from 'element-ui/lib/locale/lang/en' // lang i18n
import '@/icons'; // icon
// permission control
import './permission';
import router from './router';
import i18n from './lang'; // Internationalization

Vue.use(ElementUI, {
  size: Cookies.get('size') || 'medium', // set element-ui default size
  i18n: (key, value) => i18n.t(key, value),
});
Vue.component('v-chart', ECharts);

Vue.config.productionTip = false;
console.log(process.env);
new Vue({
  router,
  store,
  i18n,
  render: (h) => h(App),
}).$mount('#app');
